<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 <div id="listarOfertas">     
       Lista de ofertas:  
	   <table class="tabla" >
      <tr>
    <%--     <th align="left" >id</th>     --%>
        <th align="left" >Nombre</th>
        <th align="left" >Disponibles</th>
        <th align="left" >Reservadas</th>
        <th align="left" >Hasta</th>
        <th align="left" >Precio</th>
        <th align="left" >Descripcion</th>     
       </tr>
      
	 <s:iterator value="listaOfertas" var="listaOfertas">   
	 <tr>        
  <%--       <td><s:property value="id" /></td>     --%>
        <td><s:property value="nombre" /></td>
        <td><s:property value="plazasDisp" /></td>
        <td><s:property value="plazasReserv" /></td>
        <td><s:property value="fechaLim" /></td>
        <td><s:property value="precioXpersona" /></td>
        <td><s:property value="descripcion" /></td>
        <s:url action="detalleOferta" var="detalleLink">
 				<s:param name="id"><s:property value="id" /></s:param>
	    </s:url>
		<td> <a href="${detalleLink}"> Ver detalle </a></td>    
	 </tr> 
	 </s:iterator>
     
    </table>
	  
	 <s:if test= "#session.USUARIO==#session.IDPROVEEDOR"> 			  	
			<s:form  action="AltaOferta.jsp" method="post">
			<s:submit id="botonEnviar" value="Añadir oferta" />
  			</s:form> 
  	</s:if>
    	    
</div>